package com.qo.qsdk.model;

public class UserModel {

    public static String USER_KEY = "QSDK_UINFO";

    public enum Type {
        Account, Register, Token, Guest, Facebook, Google, Apple;
    }

    private String token;
    private String account;
    private int tourist;
    private int is_signup;
    private int active;
    private int days;
    private int type;
    private String pass;

    public void setAccount(String account) {
        this.account = account;
    }

    public boolean isActive() {
        return active == 1;
    }

    public String getPass() {
        return pass == null ? "" : pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isGuest() {
        return tourist == 1;
    }

    public int getDays() {
        return days;
    }

    public boolean isCreated() {
        return is_signup == 1;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getToken() {
        return token == null ? "" : token;
    }

    public String getAccount() {
        return account == null ? "" : account;
    }

    public boolean isLogined() {
        return getToken().length() > 0;
    }

}
